import request from '@/utils/request'

export function getSchoolList(params) {
    return request({
        url: 'school/getSchoolList',
        method: 'get',
        params: params
    })
}
export function getSchoolListWithSubject(data) {
    return request({
        url: 'school/getSchoolListWithSubject',
        method: 'post',
        data
    })
}

//backenApi

export function getSchoolListBackend(data, pageNum, pageSize) {
    return request({
        url: 'school/list',
        method: 'post',
        data,
        params: {
            pageNum: pageNum,
            pageSize: pageSize
        },
    })
}
export function updateSchool(data) {
    return request({
        url: 'school/updateSchool',
        method: 'post',
        data

    })
}
export function addSchool(data) {
    return request({
        url: 'school/addSchool',
        method: 'post',
        data

    })
}
export function getSchoolById(id) {
    return request({
        url: 'school/getSchoolById/' + id,
        method: 'get',
    })
} delSchool


export function delSchool(ids) {
    return request({
        url: 'school/delSchool/' + ids,
        method: 'delete',
    })
}


export function getAllSchool() {
    return request({
        url: 'school/getAllList',
        method: 'get',
    })
}
